gfx12xx (RDNA4) regex update#5429
Conversation
…evices and use the correct wavefront size.
| add_amrex_define( AMREX_USE_HIP NO_LEGACY ) | ||
| add_amrex_define( NDEBUG ) # This address a bug that causes slow build times | ||
| if (${AMReX_AMD_ARCH} MATCHES "gfx1[01].*") | ||
| if (${AMReX_AMD_ARCH} MATCHES "gfx1[012].*") |
There was a problem hiding this comment.
| if (${AMReX_AMD_ARCH} MATCHES "gfx1[012].*") | |
| if (${AMReX_AMD_ARCH} MATCHES "gfx1???") |
Could you tell me if this works?
There was a problem hiding this comment.
"gfx1???" gives an error during compilation.
CMake Error at Submodules/AMReX/Tools/CMake/AMReXSetDefines.cmake:68 (if):
if given arguments:"gfx1201" "MATCHES" "gfx1???"Regular expression "gfx1???" cannot compile
Call Stack (most recent call first):
Submodules/AMReX/Src/CMakeLists.txt:45 (include)
There was a problem hiding this comment.
Can you try
if (${AMReX_AMD_ARCH} MATCHES "^gfx1..[a-z0-9]($|:)")
this should also cover the case of extra options like gfx90a:sramecc+:xnack+
There was a problem hiding this comment.
Didn't know CMake's regex does not support ?.
There was a problem hiding this comment.
It does, but it is a modifier for the previous character (can match 0 or 1) and there can only be one question mark in a row.
There was a problem hiding this comment.
@AlexanderSinn your suggestion worked on my system and I've pushed that change into this PR.
…and catch gfx12xx (RDNA4) devices and use the correct wavefront size.
Summary
Updated regex in Tools/Cmake/AMReXSetDefines.cmake to catch gfx12xx devices and use the correct wavefront size.
Additional background
My build environment includes
Checklist
The proposed changes: